#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
/*
noip普及组题目：火柴棍等式
*/
int fun(int n)
{
    int num[]{6, 2, 5, 5, 4, 4, 6, 3, 7, 6}, sum = 0;
    while (n / 10 != 0)
    {
        sum += num[n % 10];
        n /= 10;
    }
    sum += num[n];
    return sum;
}
int main()
{
    int m;
    vector<int> v(0);
    cin >> m;
    if (m > 24)
    {
        cout << "error" << endl;
        return -1;
    }
    for (int i = 0; i <= 11; i++)
        for (int j = 0; j <= 11; j++)
        {
            int k = i + j;
            vector<int>::iterator it = find(v.begin(), v.end(), k);
            if ((fun(i) + fun(j) + fun(k)) == (m - 4) && it == v.end())
            {
                cout << i << "+" << j << "=" << k << endl;
                v.push_back(k);
            }
        }
    return 0;
}